home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Review 28
/
Creative-Review-CD-ROM-28.iso
/
pc
/
kungfu
/
assets
/
intro.dir
/
00121_Script_poll class
< prev
next >
Wrap
Text File
|
1997-08-08
|
2KB
|
80 lines
-- poll class
-- --------------------------------------------------
property obj
property folderpath
property xtraname
property disposeflag
-- ==================================================
-- new method
-- --------------------------------------------------
on new me, props
minit me, props
return me
end mnew
-- ==================================================
-- minit method
-- --------------------------------------------------
on minit me
put "in minit poll"
if the machinetype = 256 then
set platformseperator = "\"
set xtraname = "KeyPoll.x32"
else
set platformseperator = ":"
set xtraname = "KeyPoll.mac"
end if
set folderpath = "xtra" & platformseperator
openxlib the moviepath & folderpath & xtraname
set obj = new ( xtra "KeyPoll" )
set disposeflag = false
put "out minit poll"
end minit
-- ==================================================
-- monekey poll method
-- --------------------------------------------------
on monekey me, thecode
return bgonekey ()
end monekey
-- ==================================================
-- mgetallkeys poll method
-- --------------------------------------------------
on mgetallkeys
return bgallkeys ()
end mgetallkeys
-- ==================================================
-- mdispose poll method
-- --------------------------------------------------
on mdispose me
put "in mdispose poll"
if not ( disposeflag ) then
set disposeflag = true
set obj = 0
closexlib the moviepath & folderpath & xtraname
end if
put "out mdispose poll"
end mdispose